home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / lang / SmallEiffel.lha / SmallEiffel / man / compile_to_c.txt < prev    next >
Text File  |  1998-12-22  |  8KB  |  158 lines

  1.  
  2.                           The compile_to_c command
  3.                                       
  4.    Usage
  5.    
  6.    compile_to_c [options] <Root-Class> [<Root-Procedure>] [*.c] [*.o]
  7.    [-l*]
  8.    
  9.    Command compile_to_c is the SmallEiffel ANSI C code generator. Usualy
  10.    this command is automatically called by command compile but you can
  11.    use it separately to produce C code.
  12.    
  13.    Command compile_to_c must have at least one argument to indicate the
  14.    starting execution point of the system. Thus your program will start
  15.    in <Root-Procedure> of <Root-Class>. The default <Root-Procedure> is
  16.    make.
  17.    
  18.    Command compile_to_c produces all the required C files as well as a
  19.    script file. The name of this script file changes with the operating
  20.    system used (*.make on Unix or *.BAT on DOS for example).
  21.    
  22.    Options to select Eiffel compilation modes
  23.    
  24.    There are 8 modes of compilation given by the following options names:
  25.    -debug_check -all_check -loop_check -invariant_check -ensure_check
  26.    -require_check -no_check and -boost option. Only one mode can be
  27.    selected for the whole system to compile. Mode -all_check is the
  28.    default one.
  29.    -boost:
  30.           Compilation mode with the highest degree of optimization.
  31.           There is no target's existence test, no system-level validity
  32.           checking. Some routines are inlined. No code is generated to
  33.           get an execution trace in case of failure. No assertion is
  34.           checked.
  35.    -no_check:
  36.           Compilation mode in which no Eiffel assertion is checked.
  37.           The target's existence test is performed. Some code is
  38.           generated for the system-level validity checking, and to
  39.           produce an execution trace (an execution stack is managed).
  40.           There is no inlining and no assertion check.
  41.    -require_check:
  42.           Compilation mode in which Eiffel preconditions are checked.
  43.           The generated code is similar to the previous one, but also
  44.           includes code to test preconditions (require).
  45.    -ensure_check:
  46.           The generated code is similar to the previous one, but also
  47.           includes code to test postconditions (ensure).
  48.    -invariant_check:
  49.           The generated code is similar to the previous one, but also
  50.           includes code to test class invariant.
  51.    -loop_check:
  52.           The generated code is similar to the previous one, but also
  53.           includes code to test loop variant and loop invariant.
  54.    -all_check:
  55.           The default mode. The generated code is similar to the previous
  56.           one, but also includes code for the check instruction.
  57.    -debug_check:
  58.           The generated code is similar to the previous one, but also
  59.           includes code for debug instructions. All debugs are checked
  60.           regardless of the optional string key.
  61.           
  62.    Other options
  63.    
  64.    -trace:
  65.           This option may be useful to debug your program or to realize
  66.           some profiling.
  67.           When selected, this option allows the user either to generate a
  68.           "trace.se" file at execution time, or to enter the interactive
  69.           debugger.
  70.           + When one interactively chooses the generation of the trace
  71.             file, a (usually huge) file "trace.se" is created in the
  72.             launching directory which shows the code the program is
  73.             executing: which line, which column, in which Eiffel source
  74.             file. Because all classes are traced, "trace.se" is a huge
  75.             file even for a small program.
  76.             Feature GENERAL.trace_switch allows to dynamically turn
  77.             on/off trace generation. At run time, when argument of
  78.             trace_switch is true, trace printing is switched on
  79.             (conversely, false is to switch off trace printing). When
  80.             option -trace is not selected, calls to trace_switch are not
  81.             taken in account by compile_to_c (no C code is produced). The
  82.             -trace mode is not available with mode -boost. Using at the
  83.             same time -trace with -boost as the same effect as using
  84.             -trace with -no_check. Also keep in mind that very simple
  85.             instructions (as for example "i := i + 1;") may not be
  86.             traced.
  87.           + When the interactive debugger is chosen, the user enters a
  88.             gdb like interface. Please note that currently just an embryo
  89.             of debugger is implemented. It is only possible to display
  90.             the execution stack and step into the code.
  91.             Command ? displays a short help message.
  92.    -cc <c_compiler>:
  93.           Call <c_compiler> instead of the default C compiler. See the
  94.           READ_ME file of directory sys to set the default C compiler as
  95.           well as the default linker.
  96.    -no_gc:
  97.           No Garbage Collector.
  98.           When this option is selected, no GC is produced and (at least)
  99.           one actual malloc is perform for each object creation. This
  100.           option is useful when one prefers to use another GC provided by
  101.           an external library (such as the Boehm-Demers-Weiser
  102.           conservative GC), or when no GC is needed. Whithout flag
  103.           -no_gc, SmallEiffel computes a customized GC for each system.
  104.           It is important to rememeber that some architecture-dependant
  105.           code may be required for the proper operation of the GC (see
  106.           file SmallEiffel/sys/gc for details).
  107.    -no_split:
  108.           Produce only one C file for the whole Eiffel system.
  109.           This may enable the C compiler to inline more functions calls.
  110.           This option is useful only to finalize an application (the
  111.           incremental C compiling mode is switched off with -no_split).
  112.    -no_strip:
  113.           Do not remove symbol information from the generated executable
  114.           file.
  115.           This option is useful only when finalizing an application
  116.    -o <output_name>:
  117.           Name the executable file output_name.
  118.           This has the same meaning as the -o option of many C compilers.
  119.    -cecil <cecil_file>:
  120.           Allow some Eiffel features to be called from C (see the
  121.           [1]cecil file for details). To call C functions/macros from
  122.           Eiffel see the [2]external file.
  123.    -no_main:
  124.           Avoid generation of the C main function: thus, the root
  125.           procedure is not started. This is useful when one prefers to
  126.           start execution from outside before calling Eiffel routines via
  127.           the cecil interface. Before calling the first Eiffel routine
  128.           one has to call once a predefined C function in order to
  129.           initialize internal runtime information for the Eiffel world
  130.           (see example in directory SmallEiffel/lib_show/cecil/example7
  131.           for details).
  132.    -verbose:
  133.           Print system information during the compilation (full path of
  134.           loaded files, type inference score, removed files, etc.).
  135.    -no_warning:
  136.           Suppress output for all warning messages (error messages are
  137.           still printed).
  138.    -case_insensitive:
  139.           Switch case insensitive mode on.
  140.           For example, when this mode is selected, the Eiffel parser
  141.           considers that the following identifiers are equivalent : item,
  142.           ITEM, ItEm, ...
  143.           
  144.    Options passed to the C compiler
  145.    
  146.    Remaining options, *.c files, *.o files, library -l* are passed to the
  147.    C compiler/linker.
  148.    
  149.                                    [Line]
  150.    Copyright © Dominique COLNET and Suzanne COLLIN - [3]<colnet@loria.fr>
  151.                  Last update: Thursday November 5th, 1998 
  152.  
  153. References
  154.  
  155.    1. file://localhost/home/colnet/SmallEiffel/man/man/cecil.html
  156.    2. file://localhost/home/colnet/SmallEiffel/man/man/external.html
  157.    3. mailto:colnet@loria.fr
  158.